<template>
  <view class="container">
    <view class="login-box">
      <view class="title">账号登录</view>
      <view class="form-item">
        <input v-model="user" type="tel" placeholder="请输入账号" />
      </view>
      <view class="form-item">
        <input v-model="password" type="text" placeholder="请输入密码" />
      </view>
      <button @click="login" class="login-btn">立即登录</button>
      <view class="register-link">
        还没有账号？<a href="#">立即注册</a>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      user: '',
      password: ''
    };
  },
  methods: {
    login() {
      // 调用后端接口进行登录验证
      // 登录成功后跳转到用户首页
    }
  }
};
</script>

<style>
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-image: url('~@/static/login.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.login-box {
  width: 350rpx;
  padding: 30rpx;
  background-color: #fff;
  border-radius: 10rpx;
  box-shadow: 0 2rpx 5rpx rgba(0, 0, 0, 0.1);
}

.title {
  text-align: center;
  font-size: 24rpx;
  font-weight: bold;
  margin-bottom: 30rpx;
}

.form-item {
  display: flex;
  align-items: center;
  margin-bottom: 20rpx;
}

.form-item uni-icons {
  margin-right: 10rpx;
}

.form-item input {
  flex: 1;
  height: 45rpx;
  padding: 10rpx;
  border: 1px solid #ccc;
  border-radius: 5rpx;
}

.form-item button {
  width: 120rpx;
  height: 45rpx;
  margin-left: 10rpx;
  padding: 0;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5rpx;
}

.login-btn {
  width: 100%;
  height: 80rpx;
  margin-top: 30rpx;
  padding: 0;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5rpx;
}

.register-link {
  text-align: center;
  margin-top: 20rpx;
  font-size: 18rpx;
  color: #333;
}

.register-link a {
  color: #007bff;
  text-decoration: none;
}
</style>